home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / prim / console.el.z / console.el
Encoding:
Text File  |  1998-05-21  |  1.5 KB  |  47 lines

  1. ;;; console.el --- miscellaneous console functions not written in C
  2.  
  3. ;; Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
  4. ;; Copyright (C) 1995, 1996 Ben Wing
  5.  
  6. ;; Keywords: internal
  7.  
  8. ;; This file is part of XEmacs.
  9.  
  10. ;; XEmacs is free software; you can redistribute it and/or modify it
  11. ;; under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; XEmacs is distributed in the hope that it will be useful, but
  16. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. ;; General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with XEmacs; see the file COPYING.  If not, write to the 
  22. ;; Free Software Foundation, 59 Temple Place - Suite 330,
  23. ;; Boston, MA 02111-1307, USA.
  24.  
  25. ;;; Synched up with: Not in FSF.
  26.  
  27. ;;; Commentary:
  28.  
  29. ;;; Code:
  30.  
  31. (defun quit-char (&optional console)
  32.   "Return the character that causes a QUIT to happen.
  33. This is normally C-g.  Optional arg CONSOLE specifies the console
  34. that the information is returned for; nil means the current console."
  35.   (nth 3 (current-input-mode console)))
  36.  
  37. (defun resume-pid-console (pid)
  38.   "Resume the consoles with a controlling process of PID."
  39.   (mapc (lambda (c) 
  40.       (if (and (eq (console-type c) 'tty)
  41.            (eql pid (console-tty-controlling-process c)))
  42.           (resume-console c)))
  43.     (console-list))
  44.   nil)
  45.  
  46. ;;; console.el ends here
  47.